 <?php
include("./conn/conn.php");
header("content-type:text/html;charset=utf-8");
$zh=$_POST['zh'];
$pass=$_POST['password'];
$realname=$_POST['realname'];
$tel=$_POST['telphone'];
$sfzh=$_POST['sfzh'];
$sql_user="select * from tb_hydl where account='".$zh."'";
$reslut_user=mysqli_query($link,$sql_user);
if(mysqli_num_rows($reslut_user)>0){
	echo ("<script>alert('此用户名已经注册！');history.go(-1);</script>");
	exit;
	}
	$sql="insert into tb_hydl (name,contact,identity,account,password) values('$realname','$tel','$sfzh','$zh','$pass')";
	echo $zh;
	$result=$link->query($sql);
	echo $pass;
	if($result){
	echo("<script>alert('注册成功，请登陆！');window.location.href='dlym.php';</script>");
			}
	
?>